package com.hertz.iris.util;

/**
 * Bootstrap constants
 */
public class Constants {
	
	public static class MyPreference{
		private MyPreference(){}
		public static final String PREFERENCE_NAME = "iris";
		public static final String OPEN_ID_USERNAME = "openIdUserName";
		public static final String OPEN_ID_TOKEN = "openId";
		public static final String OPEN_ID_SITE = "openIdSite";
		public static final String SERVICE_RUNNING = "serviceRunning";
		public static final String LAST_TRIGGER = "lastTrigger";
		
	}

	public static class ToastMessage{
		private ToastMessage(){}
		public static final String EDITOR_PREFERENCE_AUTHKEY_ERROR = "无法识别您的身份";
		public static final String UN_SEL_ACCOUNT = "您没有选择帐号，试试游客身份吧";
		public static final String POST_MATCH_ALARM_ERROR = "保存赛事闹钟失败";
		public static final String NETWORK_ERROR = "当前网络不可用，请检查网络设置";
		public static final String LOGIN_ERROR = "登录失败";
		public static final String SHORTCUT_SET_ALARM_SUCCESS = "关注成功";
		public static final String SHORTCUT_SET_ALARM_ERROR = "关注失败";
		public static final String SHORTCUT_SET_ALARM_CANCEL_SUCCESS = "取消关注成功";
		public static final String SHORTCUT_SET_ALARM_CANCEL_ERROR = "取消关注失败";
		public static final String OP_ERROR = "操作失败";
		public static final String SYNC_SUCCESS = "同步成功";
		public static final String SYNC_ERROR = "同步失败";
		public static final String VERSION_WAS_NEW = "已经是最新版本";
	}
	
    public static class Auth {
        private Auth() {}

        /**
         * Account type id
         */
        public static final String IRIS_ACCOUNT_TYPE = "com.hertz.iris";

        /**
         * Account name
         */
        public static final String IRIS_ACCOUNT_NAME = "iris";

        /**
         * Provider id
         */
        public static final String IRIS_ROVIDER_AUTHORITY = "com.hertz.iris.sync";

        /**
         * Auth token type
         */
        public static final String AUTHTOKEN_TYPE = IRIS_ACCOUNT_TYPE;
    }

    /**
     * All HTTP is done through a REST style API built for demonstration purposes on Parse.com
     * Thanks to the nice people at Parse for creating such a nice system for us to use for bootstrap!
     */
    public static class Http {
        private Http() {}
        
        /*
         * http code
         */
        public static final int HTTP_CODE_403 = 403;
//        public static final String URL_BASE = Utils.getValues("iris.api.base");
        /**
         * Base URL for all requests
         */
//        public static final String URL_BASE = "http://192.168.1.100:8080";
        public static final String URL_BASE = "http://myiris.sinaapp.com";
//        public static final String URL_BASE = "http://192.168.5.114:8080";
//        public static final String URL_BASE_STORE = "http://myiris-package.stor.sinaapp.com";
//        public static final String URL_BASE_STORE = "http://192.168.1.100:8080";
        public static final String URL_BASE_STORE = "http://192.168.5.114:8080";
        public static final String URL_MATCH_NBA = URL_BASE + "/api/matchs/nba/%s";
        public static final String URL_SAVE_MATCH_ALARM = URL_BASE + "/api/nbaalarm/save";
        public static final String URL_ERRORLOG = URL_BASE + "/errorlog.json";
        /*
         * createOrLogin cl
         */
        public static final String URL_USER_CREATE_OR_LOGIN = URL_BASE + "/api/user/cl";
        public static final String URL_MATCH_NBA_ALARM = URL_BASE + "/api/nbaalarms/%s";
        public static final String URL_IS_ALERT = URL_BASE + "/api/nbaalarm/isAlert";
        public static final String URL_SYNC_ALARM_DATA = URL_BASE + "/api/nbaalarm/sync";
//        public static final String URL_NEXT_ALARM_TIME = URL_BASE + "/api/alarmmanager/nextAlarmTime";
        public static final String URL_ALERT = URL_BASE + "/api/nbaalarm/alert";
        public static final String URL_CANCEL_ALARM = URL_BASE + "/api/nbaalarm/cancel";
        public static final String URL_VERSION = URL_BASE_STORE + "/version";
        
        /**
         * Authentication URL
         */
        public static final String URL_AUTH = URL_BASE + "/1/login";

        /**
         * List Users URL
         */
        public static final String URL_USERS = URL_BASE + "/1/users";

        /**
         * List News URL
         */
        public static final String URL_NEWS = URL_BASE + "/1/classes/News";

        /**
         * List Checkin's URL
         */
        public static final String URL_CHECKINS = URL_BASE + "/1/classes/Locations";

        public static final String PARSE_APP_ID = "zHb2bVia6kgilYRWWdmTiEJooYA17NnkBSUVsr4H";
        public static final String PARSE_REST_API_KEY = "N2kCY1T3t3Jfhf9zpJ5MCURn3b25UpACILhnf5u9";
        public static final String HEADER_PARSE_REST_API_KEY = "X-Parse-REST-API-Key";
        public static final String HEADER_PARSE_APP_ID = "X-Parse-Application-Id";
        public static final String CONTENT_TYPE_JSON = "application/json";
        public static final String USERNAME = "username";
        public static final String PASSWORD = "password";
        public static final String OPENID_TOKEN = "openIdToken";
        public static final String SSO_USERNAME = "ssoUserName";
        public static final String MID = "mid";
        public static final String SSO_SITE = "ssoSite";

    }



    public static final byte MAX_VALUME = 100;
    public static final byte DEFAULT_VALUME = 50;
    public static final String DB_NAME = "iris_db";
    public static final String NORMAL_ALARM_ACTION = "com.hertz.iris.NORMAL_ALARM";
    public static final String MATCH_ALARM_ACTION = "com.hertz.iris.MATCH_ALARM";
    public static final String NEXT_ALARM_TIME_ACTION = "com.hertz.iris.NEXT_ALARM_TIME";
    
    public static class NORMAL_ALARM{
    	public static final boolean DEFAULT_WAVE = true;
    	public static final byte DEFAULT_VALUME = 50;
    	public static final String DEFAULT_WEEKS = "0,0,0,0,0,0,0";
    	public static final byte DEFAULT_SNOOZE = 3;
    }
    
    public final static class MATCH_ALARM{
    	public final static boolean DEFAULT_EVERY_QUARTER = true;
    	public final static boolean DEFAULT_WAVE = true;
    	public final static byte DEFAULT_VALUME = 50;
    	public final static boolean DEFAULT_INCREASE = false;
    	public final static boolean DEFAULT_AGAIN = false;
    	public final static byte DEFAULT_SCORE_DIFF = -1;
    	public final static byte DEFAULT_PERIOD = 0;
    	public final static byte DEFAULT_REMAIN = 12;
    	public final static byte DEFAULT_SATAUS = 0;
    	public final static byte STATUS_ENDALERM = 1;
    	public final static byte STATUS_UNALERM = 0;
    	public final static byte STATUS_NOALARM = -1;
    }
    public static final long DEFAULT_UID = 1;
    public static final long DEFAULT_INTERVAL = 1000 * 60;
    public static final long BOOTSTART_INTERVAL = 1000 * 60;
    public static final int DEFAULT_SYNC_TIME_DAYS = 7;
    
    public static final String SHARE_CONTENT_TEMPLATE = "%s vs %s,%d:%d,NBA精彩比赛提醒（来自 #iris 测试版# http://myiris.sinaapp.com/download.html）";
    public static final String SHARE_TITLE = "iris";
}


